import request from '@/utils/request'

//获取设备信息列表
export function listDevice(query){
    return request({
        url:'/device/deviceInfo/list',
        method: 'get',
        params: query
    })
}

//获取设备信息详情
export function getDevice(id){
    return request({
        url: '/device/deviceInfo/getInfo/'+ id,
        method: 'get'
    })
}

//新增设备信息
export function addDevice(data){
    return request({
        url: '/device/deviceInfo/add',
        method: 'post',
        data: data
    })
}

//修改设备分类
export function editDevice(data){
    return request({
        url: '/device/deviceInfo/edit',
        method: 'put',
        data: data
    })
}

//删除设备分类
export function deleteDevice(id){
    return request({
        url: '/device/deviceInfo/remove/' + id,
        method: 'delete'
    })
}